export function clockwise90(curDeg: number) {
  let deg = 0;
  const degs = [90, 180, 270];
  for (let i = 0; i < degs.length; i++) {
    const val = degs[i];
    if (curDeg < val) {
      deg = val;
      break;
    }
  }
  return deg;
}

export const isMobile = !!navigator.userAgent.match(
  /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
);
